<% if !@user.nil? %>
<table>
<caption>Usuarios Encontrados</caption>
<thead>
  <tr>
  	<th>Usuario</th>
  	<th>Nombre</th>
  	<th>Rol</th>
  	<th>Email</th>
  	<th colspan="3" class="opciones">Opciones</th>
  </tr>
</thead>
<% for user in @user %>
  <tr>
	  <td><%= user.login %></td>
 	  <td><%= user.name %></td>
 	  <td><%= user.role_user.descripcion %></td>
 	  <td><%= user.email %></td>
	<td style="text-align: center;"><%= link_to image_tag("preview-16x16.png", :border=>0, :title=>'Ver'), 
																							user %></td>
																							

	<td style="text-align: center;"><%= link_to_remote image_tag("edit-16x16.png", :border=>0, :title=>'Editar'), 
																										 {:edit => 'user', 
																										 	:method => :get, 
																										 	:url => edit_user_path(user)} %></td>

	<td style="text-align: center;"><%= link_to image_tag("delete-16x16.png", :border=>0, :title=>'Eliminar'), 
																							user, 
																							:confirm => 'Seguro que quiere eliminar?', 
																							:method => :delete
																							%></td>
  </tr>
<% end %>
</table>
<% end %>
